﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EnvDTE;
using System.IO;
using VSLangProj;

namespace WyoCode.WyoApp_VSTools
{
    public class VSSLProject
    {
        private string p;
        public Project Project { get; set; }

        public string Name { get; set; }
        public string RelativeLoc { get; set; }
        public string ProjectName
        {
            get
            {
                return Project.Name;
            }
        }


        public VSSLProject(string p, EnvDTE.Project DTE_Project)
        {
            // TODO: Complete member initialization
            var sl = p.Split('|');
            Name = sl[0];
            RelativeLoc = sl[1];

            foreach (Project pro in ((EnvDTE90.Solution3)DTE_Project.DTE.Solution).Projects)
            {
                if (pro.FullName.EndsWith(RelativeLoc.TrimStart('.')))
                {
                    this.Project = pro;
                    break;
                }
            }


           
            
        }
    }
}
